﻿<UserControl x:Class="PocketBook.UI.View.Workspaces.StatusWorkspaceView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:conv="clr-namespace:PocketBook.UI.Converters"
             mc:Ignorable="d" >
    <UserControl.Resources>
        <conv:AmountValueConverter x:Key="AmountValueConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Grid.Row="0" BorderBrush="Gray" Margin="4,6,6,6" BorderThickness="1" Padding="6,6,30,6" >
            <Grid >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Text="Status: " Margin="6,6,6,6" />
                <TextBlock Grid.RowSpan="2" Grid.Column="1" Text="{Binding Status, Converter={StaticResource AmountValueConverter}, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Margin="10,-8,0,0" FontSize="60" FontWeight="Light"/>
            </Grid>
        </Border>
        <Border Grid.Row="1" BorderBrush="Gray" Margin="4,6,6,6" BorderThickness="1" Padding="6,6,30,6" >
            <Grid >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Last month expenses: " Margin="6,6,6,6" />
                <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding LastMonthExpenses, Converter={StaticResource AmountValueConverter}, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Margin="6,6,0,0"/>

                <TextBlock Grid.Row="1" Grid.Column="0" Text="Last month incomes: " Margin="6,6,6,6" />
                <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding LastMonthIncomes,Converter={StaticResource AmountValueConverter}, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Margin="6,6,0,0"/>
            </Grid>
        </Border>
    </Grid>
</UserControl>
